<?php

//Route::post('index', 'Frontend\Users\IndexController@index');
//Route::post('login', 'Frontend\Users\AuthController@login');
//Route::group([
//    'prefix' => 'auth',
//    'middleware' => ['userAuth','enableCross']
//        ], function ($router) {
//    Route::post('userInfo', 'Frontend\Users\AuthController@userInfo');
//    Route::post('logout', 'Frontend\Users\AuthController@logout');
//    Route::post('refresh', 'Frontend\Users\AuthController@refresh');
//    Route::resource('index/index','Frontend\Users\IndexController');
//});
//

Route::get('/', 'Frontend\Rotation\IndexController@index');
Route::get('course/index', 'Frontend\Course\IndexController@index');
//微信授权成功后新增用户
Route::group(['prefix' => 'student'], function () {
    Route::get('/', 'Frontend\Users\StudentController@index'); //新增用户
    //获取用户信息
    Route::get('/{openId}', 'Frontend\Users\StudentController@getUserInfo');
    //获取用户预约订单
    Route::post('getUserOrder/', 'Frontend\Users\StudentController@getUserOrder');
    //获取openId
    Route::post('getOpenId/', 'Frontend\Users\StudentController@getOpenId');
    //完善信息
    Route::post('information/', 'Frontend\Users\StudentController@information');
});
//课程列表
Route::group(['prefix' => 'dances'], function () {
    //课程列表
    Route::get('/', 'Frontend\Dances\IndexController@index');
    Route::post('subscribeDances', 'Frontend\Dances\IndexController@subscribeDances');
    Route::get('/{dancesId}', 'Frontend\Dances\IndexController@show');
});

//课程列表
Route::group(['prefix' => 'about'], function () {
    //课程列表
    Route::get('/', 'Frontend\About\IndexController@index');
});
